/* Handles all input events from devices i.e. keyboard, system, etc.

	Contains what to do for each event

	i.e.

	void Event::OnEvent( vk_code ) {
	switch (vk_code) {
		case (VK_UP)

*/

#include "Event.h"

Event::Event() {
	// Does nothing
}
		
Event::~Event() {
}

void Event::OnEvent( INPUT_RECORD event_instance )
{
	// Keyboard events
	if ( event_instance.EventType == KEY_EVENT )
	{
		switch ( event_instance.Event.KeyEvent.wVirtualKeyCode )
		{
			case VK_UP: {
				OnKeyDown( VK_UP );
				break;
			}
			case VK_DOWN:	{
				OnKeyDown( VK_DOWN );
				break;
			}
			case VK_LEFT:	{
				OnKeyDown( VK_LEFT );
				break;
			}
			case VK_RIGHT:
			{
				OnKeyDown( VK_RIGHT );
				break;
			}
			case VK_RETURN:  // Enter
			{
				OnKeyDown( VK_RETURN );
				break;
			}

			case VK_ESCAPE:
			{
				OnExit();
				break;
			}
		}
	}
	// Implement window events later
}

void Event::OnKeyDown( int )
{
	// Pure virtual, do nothing
}

void Event::OnKeyUp( int )
{
	// Pure virtual, do nothing
}

void Event::OnExit()
{
	// Pure virtual, do nothing
}
